<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var week="Monday";
    var weather="Sun";
    var wind=5;

//    console.log('星期：'+week);
//    console.log("气候："+weather);
//    console.log("城市："+city);
//    console.log("风力:"+wind);

    try{
        //有可能产生异常的语句
        console.log("星期:"+week);
        console.log("气候："+weather);
        //var score=new eval();//eval is not a constructor
        console.log("风力:"+wind);
    }catch(ex){
        //捕捉异常
        //ex是对象，可以获得异常错误信息
        //通常异常的处理是要把日志信息信息保存到文件中
        console.log(ex.message);
    }finally{
        //最后必须、一定执行的语句
        console.log(111);
        console.log(222);
        console.log(333);
    }
</script>
</body>
</html>